<template>
  <div class="a">
    A
    <button @click="handleBtn">点击按钮，把我的数据，给b组件</button>
  </div>
</template>
<script>
import EventBus from '@/eventBus/index'
export default {
  methods: {
    handleBtn() {
      console.log('click')
      // console.log(EventBus.$emit, 'EventBus')
      EventBus.$emit('fromAtoB', { list: [1, 2, 3, 4], age: 123, name: 'devin' })
    },
  },
}
</script>
<style lang="scss">
.a {
  width: 500px;
  height: 200px;
  margin: 5px;
  border: 1px solid #000;
  border-radius: 10px;
}
</style>
